package servlet;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import model.PollImpl;
import bean.Poll;
import bean.PollUser;
import model.EmailingSystem;

public class pmVotingAdminServlet extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7553409997388668872L;

	public void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		response.setContentType("text/html");
		response.setCharacterEncoding("GBK");
		
		HttpSession session=request.getSession(true);
    	PollUser pu = (PollUser)session.getAttribute("user");
    	ArrayList<Poll> array = new ArrayList<Poll>();
    	PollImpl pi = new PollImpl();
    	pi.setPollAttributesPM(array, pu.getUsername());

		RequestDispatcher rd=request.getRequestDispatcher("PMListPolls.jsp");
		rd.forward(request, response);
		
	}
	
}
